package com.ihrm.system.dao;


import com.ihrm.domain.system.RolePermission;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface RolePermissionDao {

    @Delete("delete from pe_role_permission where role_id = #{roleId}")
    void delByRoleId(String roleId);

    void insertBatch(Map<String, Object> map);

    @Select("select * from pe_role_permission where role_id = #{id}")
    List<RolePermission> selectByRoleId(String id);

    @Select("select * from pe_role_permission where permission_id = #{id}")
    List<RolePermission> getBypermId(String id);
}
